package com.pxxy.app_homepage.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.pxxy.lib_common.base.BaseFragment;

import java.util.List;

public class FragmentHomeViewPageAdapter extends FragmentPagerAdapter {
    private FragmentManager fragmentManager;
    private List<BaseFragment> fragments;

    public FragmentHomeViewPageAdapter(FragmentManager fm,List<BaseFragment> fragments) {
        super(fm);
        this.fragmentManager = fm;
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int i) {
        return fragments.get(i);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }
}
